/********************************************
 * 功能说明: 
 * 模块名称: 
 * 系统名称: 
 * 软件版权: Frank
 * 系统版本: 1.0.0
 * 开发人员: leebean
 * 开发时间: 2020/1/1 21:07
 * 审核人员: 
 * 相关文档: 
 * 修改记录: 修改日期 修改人员 修改说明
 *********************************************/
package com.spring.arch.job.client;

import com.spring.arch.common.dto.result.ListResultDTO;
import com.spring.arch.common.dto.result.ResultDTO;
import com.spring.arch.job.dto.JobParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author leebean
 * @version 1.0.0
 * @since 2020/1/1 21:07
 */
@FeignClient(value = "${service.job}", path = "/job/w/task", fallback = JobClientHystric.class)
public interface JobClient {

    @RequestMapping(value = "/batchSave", method = RequestMethod.POST, produces=MediaType.APPLICATION_JSON_VALUE)
    ListResultDTO<Integer> create(List<JobParam> jobParams);

    @RequestMapping(value = "delete", method = RequestMethod.DELETE, produces=MediaType.APPLICATION_JSON_VALUE)
    ResultDTO<Void> delete(List<Integer> jobIds);
}
